package com.jsti.sis.controller.demo;


import com.jsti.ccp.common.result.HttpResult;
import com.jsti.sis.service.demo.MenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;


/**
 * controller
 */
@RestController
@Api(tags = "菜单管理Controller")
@RequestMapping("/menu")
@Slf4j
public class MenuController {

    @Resource
    private MenuService menuService;

    @ApiOperation(value = "获取信息", notes = "获取信息")
    @RequestMapping(value = "/{id}", method = RequestMethod.GET)
    public HttpResult get(@PathVariable(value = "id") Long id) {
        log.info("id,{}", id);
        return HttpResult.ok(menuService.get(id));
    }
}
